import os



# This function returns a list of all wrf ouput files in the directory.
#-----------------------------------------------------------------------------------------------------------------------------------------
def list_ncfiles(Dir, ncfiles):
	for f in os.listdir(Dir):
		if f.startswith('wrfout'):
			ncfiles.append(f)
	ncfiles.sort()
	return (ncfiles)

# This function returns a list of all post_processed data in a given directory
#-----------------------------------------------------------------------------------------------------------------------------------------
def list_PP_files(Dir):
	Post_Processed_Data = []
	for f in os.listdir(Dir):
		if f=='.DS_Store':
			pass
		else:
			Post_Processed_Data.append(f)
	return (Post_Processed_Data)

# This function returns a list of all post_processed data in a given directory
#-----------------------------------------------------------------------------------------------------------------------------------------
def list_csv_files_3 (Dir, csv_files):
	for f in os.listdir(Dir):
		if f=='.DS_Store':
			pass
		else:
			csv_files.append(f)
	csv_files.sort()
	return (csv_files)